<div ng-show="locationEditing">
    <a style="float: right; margin-right: 30px;" href="javascript:;" ng-click="switchLocationList();"> <i
            class="icon-reply"></i> 返回规则列表
    </a>
    <h5 style="margin-top: 30px">规则基本信息</h5>

    <form class="form-horizontal">
        <div class="form-group">
            <label class="col-sm-4 control-label no-padding-right">匹配类型</label>

            <div class="col-sm-7">
                <select disabled ng-model="locationEditing.matchType" ng-enter="addLocation()">
                    <option value="prefix">prefix</option>
                    <option value="regex">regex</option>
                    <option value="common">common</option>
                    <option value="exact">exact</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label no-padding-right">路径/正则表达式</label>

            <div class="col-sm-7">
                <input disabled ng-model="locationEditing.pattern" ng-enter="addLocation()" type="text"
                       class="input input-xxlarge"
                       placeholder="">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label no-padding-right"></label>

            <div class="col-sm-7">
                <label class="checkbox inline"> <input disabled ng-model="locationEditing.caseSensitive"
                                                       type="checkbox">
                    大小写敏感
                </label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label no-padding-right"></label>

            <div class="col-sm-7">
                <label class="checkbox inline">
                    HTTPS类型
                </label>
                <div class="col-sm-6" ng-switch="locationEditing.httpsType">
                    <input disabled ng-trim="true" type="text" value="HTTP,HTTPS" ng-switch-when="1">
                    <input disabled ng-trim="true" type="text" value="强制HTTP" ng-switch-when="2">
                    <input disabled ng-trim="true" type="text" value="强制HTTPS" ng-switch-when="3">
                </div>
            </div>
        </div>
    </form>
    <br> </a>
    <h5 style="margin-top: 0px; margin-bottom: 20px">指令列表</h5>
    <table class="table table-bordered" style="width: 100%">
        <thead>
        <tr>
            <th>指令类型</th>
            <th>指令详细参数</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="directive in locationEditing.directives" ng-init="inputs = getInputs(directive.type)"
            ng-model="switch">
            <td>{{directive.type}}</td>
            <td><span ng-repeat="(name, value) in directive.dynamicAttributes" ng-init="input = inputs[name]">
            {{ name }}="{{directive.dynamicAttributes[name]}}" &nbsp;</span></td>
        </tr>
        </tbody>
    </table>
</div>

